var localServer;

// Called onload to initialize local server and store variables
function init() {
  if (!window.google || !google.gears) {
    textOut("NOTE: You must install Google Gears first.");
  } else {
    localServer = google.gears.factory.create("beta.localserver");
    textOut("Yay, Google Gears is already installed.");
  }
}

// Utility function to output some status text.
function textOut(s) {
 var elm = document.getElementById("textOut");
  while (elm.firstChild) {
    elm.removeChild(elm.firstChild);
  } 
  elm.appendChild(document.createTextNode(s));
}
